-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix svg xml parse #127
base: master
Are you sure you want to change the base?
fix svg xml parse #127
Conversation
I want to know that why the npm version is still five years ago,which remains a bug about svg parsing ‘imagetrick non-conforming drawing primitive definition text-align’. It drove me mad yesterday. |
@codetker you can use fixed fork https://www.npmjs.com/package/@mikepol/imagemagick |
@mike1pol I am very glad for your timely reply,even though it doesn't works. I use imagemagick to convert the output svg (from draw.io) in other image type, it works if there are no words in the svg chart.
2、An idea came to me that the svg may not stardard ,although it looks well in browsers.So I delete words about 'text-align' to avoid the error.And turns the svg to the bottom.
It works for imagemagicks and I got my png.A pity that the png is not what I want, some error tips on it, instand of Chineses words. 3、I also tried gm( I saw it in your last commit msg in readme.txt),it doesn't interrupted,but it only convert the part it identified. 4、I tried imagemagick-native, rsvg, imagemagick2 which all calls node-gym,but all of them occurs a problem familiar to nodejs/node-gyp#809. It wastes me a whole afternoon to try to solve the problem but failed. 5、Lastly,I use svgexport to get a luck. I used it before ,but it depends on PhantomJS, which is a quite huge guy. It turns out the svg with Chinese words can be well converted. The process of converting for svgexport is more than 2 seconds, while imagemagick only takes one percent. So long haven't I written English, it very kind of you to read my poor words. How I wish imagemagic updates and be better and better! |
fix svg xml parse on parseIdentify